// 菜单配置
// 使用字符串形式的图标名称，与 Ant Design 的图标组件名称对应
export const menuData = [
  {
    name: '首页',
    path: '/',
    icon: 'HomeOutlined',
  },
  {
    name: '用户管理',
    path: '/user',
    icon: 'UserOutlined',
    access: 'canAccessUser',
    routes: [
      {
        name: '用户列表',
        path: '/user/list',
      },
      {
        name: '添加用户',
        path: '/user/create',
        hideInMenu: true,
      },
      {
        name: '用户详情',
        path: '/user/detail/:id',
        hideInMenu: true,
      },
    ],
  },
  {
    name: '角色管理',
    path: '/role',
    icon: 'TeamOutlined',
    access: 'canAccessRole',
    routes: [
      {
        name: '角色列表',
        path: '/role/list',
      },
      {
        name: '添加角色',
        path: '/role/create',
        hideInMenu: true,
      },
      {
        name: '角色详情',
        path: '/role/detail/:id',
        hideInMenu: true,
      },
    ],
  },
  {
    name: '权限管理',
    path: '/permission',
    icon: 'LockOutlined',
    access: 'canAccessPermission',
    routes: [
      {
        name: '权限列表',
        path: '/permission/list',
      },
      {
        name: '添加权限',
        path: '/permission/create',
        hideInMenu: true,
      },
    ],
  },
  {
    name: '菜单管理',
    path: '/menu',
    icon: 'MenuOutlined',
    access: 'canAccessMenu',
    routes: [
      {
        name: '菜单列表',
        path: '/menu/list',
      },
      {
        name: '添加菜单',
        path: '/menu/create',
        hideInMenu: true,
      },
    ],
  },
  {
    name: '系统设置',
    path: '/system',
    icon: 'SettingOutlined',
    access: 'canAccessSystem',
    routes: [
      {
        name: '系统参数',
        path: '/system/settings',
      },
      {
        name: '操作日志',
        path: '/system/operation-logs',
      },
      {
        name: '登录日志',
        path: '/system/login-logs',
      },
    ],
  },
  {
    name: '个人中心',
    path: '/account',
    icon: 'ProfileOutlined',
    routes: [
      {
        name: '个人资料',
        path: '/account/profile',
      },
      {
        name: '修改密码',
        path: '/account/change-password',
      },
    ],
  },
];

export default menuData;
